import request from "@/utils/request";

// 获取上传记录列表,分页
export function getUploadHistoryList(data) {
  return request({
    url: "/UploadHistory/list",
    method: "get",
    params: data,
  });
}

// 获取详细数据
export function getUploadHistoryById(data) {
  return request({
    url: "/UploadHistory/ " + data,
    method: "get",
  });
}

// 添加上传记录数据
export function addUploadHistory(data) {
  return request({
    url: "/UploadHistory",
    method: "post",
    data: data,
  });
}

// 修改上传记录数据
export function updateUploadHistory(data) {
  return request({
    url: "/UploadHistory/update",
    method: "put",
    data: data,
  });
}

// 删除上传记录数据 (单个删除)
export function deleteUploadHistory(data) {
  return request({
    url: "/UploadHistory/" + data,
    method: "delete",
  });
}

// 批量删除上传记录数据
export function deleteUploadHistoryBatch(data) {
  return request({
    url: "/UploadHistory/batch",
    method: "delete",
    data: data,
  });
}

// 获取最近4个月的上传数量
export function getUploadHistoryCount() {
  return request({
    url: "/UploadHistory/statistics/upload",
    method: "get",
  });
}
